<html>
<head><meta charset="utf-8"><title>trait alias expansion · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html">trait alias expansion</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="154657305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657305">(Jan 08 2019 at 16:42)</a>:</h4>
<p>Actually <span class="user-mention" data-user-id="124069">@Alexander Regueiro</span> something about your PR is confusing me:</p>
<p>I didn't notice it before, but the <code>TraitAliasExpander</code> -- why is the stack these <code>TraitAliasExpansionInfo</code> entries (which are small vectors) and not just a single <code>PolyTraitRef</code>?</p>



<a name="154657349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657349">(Jan 08 2019 at 16:42)</a>:</h4>
<p>it seems like they could just be a single predicate</p>



<a name="154657378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657378">(Jan 08 2019 at 16:43)</a>:</h4>
<p>Oh... that was because the expansion info (the path taken through expansions), including the spans, was necessary before when I was linting on <em>expanded</em> duplicates. But then we decided we didn't want that.</p>



<a name="154657434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657434">(Jan 08 2019 at 16:43)</a>:</h4>
<p>So yes, it can be converted to <code>PolyTraitRef</code> now :-)</p>



<a name="154657435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657435">(Jan 08 2019 at 16:43)</a>:</h4>
<p>Ah, OK.</p>



<a name="154657436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657436">(Jan 08 2019 at 16:43)</a>:</h4>
<p>simplified</p>



<a name="154657453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657453">(Jan 08 2019 at 16:43)</a>:</h4>
<p>I thought it might be something like that</p>



<a name="154657461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154657461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154657461">(Jan 08 2019 at 16:43)</a>:</h4>
<p>OK</p>



<a name="154658410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154658410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154658410">(Jan 08 2019 at 16:55)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="154670942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154670942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154670942">(Jan 08 2019 at 19:42)</a>:</h4>
<p>how's it all going? :-)</p>



<a name="154672335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154672335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154672335">(Jan 08 2019 at 20:00)</a>:</h4>
<p>mm OK but I ran out of time and had to run to a meeting; I'm not 100% sure how to integrate the trait alias expansion with the "principal" checking code</p>



<a name="154672345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154672345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154672345">(Jan 08 2019 at 20:00)</a>:</h4>
<p>I'm debating actually about separating the PR into two</p>



<a name="154672353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154672353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154672353">(Jan 08 2019 at 20:01)</a>:</h4>
<p>i.e., move that code into a separate PR</p>



<a name="154683962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/trait%20alias%20expansion/near/154683962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alexander Regueiro <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/trait.20alias.20expansion.html#154683962">(Jan 08 2019 at 22:49)</a>:</h4>
<p>yeah this is why I had to leave this PR aside heh</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>